#!/bin/bash

# 每次built版本
# version=`date "+%Y%m%d%H%M%S"`

mkdir -p $PWD/logs
# mkdir -p $PWD/monitor


git pull

# 生成镜像
docker build -t foreveross/ab-monitor .

# 删除容器
docker rm -f ab-monitor

# 启动镜像 -v $PWD/monitor:/root/monitor \
docker run -d --restart=on-failure:5 --net=host \
    -v $PWD/tomcat/conf:/usr/local/tomcat/conf \
    -v $PWD/logs:/usr/local/tomcat/logs \
    --name ab-monitor foreveross/ab-monitor
